#include<iostream>
#include<algorithm>

using namespace std;

const int N=1e5+10;

bool st1[N],st2[N];
int n,m;


int main()
{
	cin>>n>>m;
	
	int ans1=0,ans2=0;
	while(m--){
		int a,b;
		scanf("%d%d",&a,&b);
		if(!st1[a]){
			st1[a]=true;
			ans1++;
		}
		if(!st2[b]){
			st2[b]=true;
			ans2++;
		}
		
		cout<<(long long)(n-ans1)*(n-ans2)<<' ';
	}	 
	
	return 0;
}
